package com.xsz.pda.data.bean

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey

@Entity
data class Ticket(
    @PrimaryKey val id: String,
    @ColumnInfo(name = "qrcode") val qrcode: String?,               //二维码
    @ColumnInfo(name = "m1") val m1: String?,                       //芯片
    @ColumnInfo(name = "idnumber") val idNumber: String?,           //身份证号
    @ColumnInfo(name = "ticketTypeId") val ticketTypeId: String,    //票型
    @ColumnInfo(name = "delflag") val delFlag: String,              //删除标识
    @ColumnInfo(name = "timestamp") val timestamp: Long,            //最近更新时间
    @ColumnInfo(name = "signStatus") val signStatus: String?,       //签到状态
    @ColumnInfo(name = "m1Value") val m1Value: String?,
    @ColumnInfo(name = "name") val name: String?,                   // 姓名
    @ColumnInfo(name = "status") val status: String = "1",          // 状态
    @ColumnInfo(name = "areaName") val areaName: String = "",       // 区域
    @ColumnInfo(name = "sectorName") val sectorName: String = "",   // 扇区
    @ColumnInfo(name = "outerId") val outerId: String = "",         // 票号
    @ColumnInfo(name = "seat") val seat: String = "",         // 座位
) {
    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return false
        other as Ticket
        if (id != other.id) return false
        return true
    }

    override fun hashCode(): Int {
        return id.hashCode()
    }
}